<h1>Listing iterations</h1>

<br />

<%= link_to 'Previous page', { :page => @iteration_pages.current.previous } if @iteration_pages.current.previous %>
<%= link_to 'Next page', { :page => @iteration_pages.current.next } if @iteration_pages.current.next %> 

<br />

<table>
  <tr>
    <th>Iteration</th>
    <th>Start Date</th>
    <th>End Date</th>
  </tr>
  
<% for iteration in @iterations %>
  <tr>
    <td><%= link_to "Iteration #{iteration.iteration_number}", :action => :show, :id => iteration.id %></td>
    <td><%= iteration.start_date %></td>
    <td><%= iteration.end_date %></td>
    <td><%= link_to 'Destroy', { :action => 'destroy', :id => iteration }, :confirm => 'Are you sure?', :method => :post %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New iteration', :action => 'new' %>
